/*!
\file ContainerVisualizer.h
\brief Contains declaration of ContainerVisualizer.
\ingroup GUI
*/

#ifndef CONTAINERVISUALIZER_H
#define CONTAINERVISUALIZER_H

#include<QWidget>
#include<QVBoxLayout>
#include<QHBoxLayout>
#include<QLabel>
#include<QFrame>

/*!
\class ContainerVisualizer
\brief GUI class to visualize the contents of a Container.
\ingroup GUI
*/

class ContainerVisualizer: public QFrame{
public:
	ContainerVisualizer( int id, QWidget *parent );
	//!< Constructor. \param id is the ID of the Container it represents. \param parent
	int identifier()const{ return m_id; }
	//!< Returns its ID.
	void insert( int i );
	//!< Insert an empty element in location i.
	void remove( int i );
	//!< Remove element at location i.
	void setNode( int i, int nodeID, QString label = "" );
	//!< Set Node with id nodeID at location i.
	void setEdge( int i, int from, int to, QString label = "" );
	//!< Set Edge at location i.
	void setData( int i, QString data );
	//!< Set data at location i.
private:
	int m_id;
	QBoxLayout *m_layout;
	QWidget *m_widget;
	
	QList<QWidget*> m_widgets;
	QList<QVBoxLayout*> m_layouts;
	QList< QList<QLabel*> > m_data;
};

#endif
